package com.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * @author WxrStart
 * @create 2022-06-14 15:14
 */@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Seckill {
    @TableId(type= IdType.AUTO)
    private Integer seckillId;

    @TableField(fill = FieldFill.INSERT)
    private Date startTime;
    private Date endTime;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public Seckill(Date startTime, Date endTime) {
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public Seckill(Integer seckillId, Date startTime, Date endTime, Date createTime) {
        this.seckillId = seckillId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.createTime = createTime;
    }

}
